<?php
declare (strict_types=1);

namespace app\middleware\ymsh;

use app\common\facade\auth\Auth;

class Verification
{
    /**
     * 处理请求
     *
     * @param \think\Request $request
     * @param \Closure $next
     */
    public function handle($request, \Closure $next)
    {
        if (!Auth::attempt($request->all())) return fail('登录失败',4000);
        return $next($request);
    }
}
